package cn.tedu.service.impl;

import cn.tedu.mapper.ChapterMapper;
import cn.tedu.pojo.Chapter;
import cn.tedu.service.ChapterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChapterServiceImpl implements ChapterService {
    @Autowired
    private ChapterMapper chapterMapper;

    @Override
    public String getContentByChapterId(Integer chapterId) {
        String content = chapterMapper.getContentByChapterId(chapterId);
        return content;
    }

    @Override
    public List<Chapter> getChapterByNovelId(Integer novelId) {
        List<Chapter> chapters = chapterMapper.getChapterByNovelId(novelId);
        return chapters;
    }
}
